The present invention relates generally to file transfers over a communication medium and more particularly relates to a method and system for transferring objects from one computer to another.
The development of network computing (xe2x80x9cNCxe2x80x9d) technology has spawned the development of several intelligent devices, ranging from simple thin-client desk-top computers, to internet-aware screen phones, mobile phones, personal digital assistants (xe2x80x9cPDAsxe2x80x9d), public kiosks, smart-card based banking devices, etc. The Java computer language has been an important feature of this technological development, as it provides a xe2x80x9cWrite Once, Run Anywherexe2x80x9d platform which is an effective way to transfer an application from a server to a device for local execution on the device. Thus, Java provides the ability to transparently deliver, via a communications mechanism such as a general purpose network or a special purpose communications port, software to a variety of devices having different hardware platforms and has become a standard language for internet applications.
Additional transfer functionality is provided in the more recent Java Dynamic Management Kit, and discussed in Java Dynamic Management Kit 3.0 Programming Guide, 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, Calif. 94303 U.S.A. (xe2x80x9cJDMKxe2x80x9d).
While Java and the JDMK provide effective ways to pass or transfer a software application to a device, they do not provide solutions to certain problems that can arise with file transfers. For example, existing solutions do not provide a robust recovery mechanism once power is restored, should power to the device be interrupted during a transfer. Further, where the communication medium has reduced bandwidth, it can be desirable to only download the components of the application which are not already resident on the device. In addition, Java and the JDMK do not provide an infrastructure for managing the persistent storage of Java objects.
It is an object of the present invention to provide a novel method and system for transferring objects between computers which obviates or mitigates at least one of the disadvantages of the prior art.
The present invention provides a method and system for transferring objects between computers, especially a server and a device in a Java environment. A server connected to the device interrogates the device to determine whether the device has the available resources to accept a download, and to determine if any of objects included in the download are already resident on the device. Using a gateway object on the device, and a gateway managed-object on the server, the server passes an archive of the necessary objects, specifically those not presently available on the device, to the gateway via the gateway managed-object. The gateway then instructs a persistent storage repository on the device to commit the archive to persistent storage.
A flag is set at the start of the archive-committing process, such that if the device loses power during the archive-committing process, upon re-initialization of the device, the device can determine that the archive-committing process failed and will instruct the persistent storage to free-up storage area used during the archive-committing process. The transferal of objects can then be recommenced once the server and device reestablish communication.
The present invention can provide an effective means to ensure a stable recovery of the device upon re-initialization, should the file transfer and/or archive-commit process fail due to a power failure to the device. Further, the invention can increase efficient use of device resources by not loading redundant components on the device and can reduce bandwidth requirements and/or download times as redundant information is not transferred.